﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AcceptanceTest.Framework.UnitTests
{
    public class Steps
    {
        public int OrderId { get; set; }
        public string Form { get; set; }
        public double Score { get; set; }
        public DateTime Time { get; set; }

        [Config("Url")]
        public string Url { get; set; }

        [Step(@"^the order (\d+)$")]
        public void SetOrderId(int orderId)
        {
            this.OrderId = orderId;
        }

        [Step(@"^the form (.+)$")]
        public void SetForm(string form)
        {
            this.Form = form;
        }

        [Step(@"^the score (\d+\.?\d?) at (.+)$")]
        public void SetForm(double score, DateTime time)
        {
            this.Time = time;
            this.Score = score;
        }

        [Step(@"^there is an error$")]
        public void Error(string form)
        {
            throw new Exception("testing error");
        }

    }
}
